.class public Lcom/estrongs/fs/util/b;
.super Lcom/estrongs/fs/util/c;
.source "ESEncrypt.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/fs/util/b$a;
    }
.end annotation


# instance fields
.field private g:I

.field private h:I

.field private i:[B

.field private j:[B

.field private k:[B

.field private l:[B

.field private m:Z

.field private n:Ljavax/crypto/Cipher;

.field private o:Ljava/lang/String;

.field private p:Ljava/io/File;

.field private q:Ljava/io/File;

.field private r:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lcom/estrongs/fs/g;Ljava/lang/String;Z)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, p2, p3, v0}, Lcom/estrongs/fs/util/b;-><init>(Lcom/estrongs/fs/g;Ljava/lang/String;ZLjava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Lcom/estrongs/fs/g;Ljava/lang/String;ZLjava/lang/String;)V
    .locals 6

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move v3, p3

    move-object v4, p4

    .line 2
    invoke-direct/range {v0 .. v5}, Lcom/estrongs/fs/util/b;-><init>(Lcom/estrongs/fs/g;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Lcom/estrongs/fs/g;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;)V
    .locals 1

    .line 3
    invoke-direct {p0}, Lcom/estrongs/fs/util/c;-><init>()V

    const/4 v0, 0x0

    .line 4
    iput-object v0, p0, Lcom/estrongs/fs/util/b;->n:Ljavax/crypto/Cipher;

    .line 5
    iput-object v0, p0, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    .line 6
    iput-object p1, p0, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    .line 7
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/fs/util/c;->a:[B

    .line 8
    iput-boolean p3, p0, Lcom/estrongs/fs/util/b;->m:Z

    .line 9
    iput-object p4, p0, Lcom/estrongs/fs/util/b;->o:Ljava/lang/String;

    .line 10
    iput-object p5, p0, Lcom/estrongs/fs/util/b;->r:Ljava/lang/String;

    return-void
.end method

.method protected static a([B[BI)I
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/estrongs/fs/util/EncryptException;
        }
    .end annotation

    const-string v0, "String to long"

    if-nez p1, :cond_1

    add-int/lit8 p1, p2, 0x1

    .line 97
    array-length v1, p0

    if-gt p1, v1, :cond_0

    const/4 v0, -0x1

    .line 98
    aput-byte v0, p0, p2

    return p1

    .line 99
    :cond_0
    new-instance p0, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {p0, v0}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw p0

    .line 100
    :cond_1
    array-length v1, p1

    add-int/2addr v1, p2

    add-int/lit8 v1, v1, 0x1

    array-length v2, p0

    if-gt v1, v2, :cond_3

    .line 101
    array-length v0, p1

    int-to-byte v0, v0

    aput-byte v0, p0, p2

    const/4 v0, 0x0

    add-int/lit8 p2, p2, 0x1

    .line 102
    :goto_0
    array-length v1, p1

    if-ge v0, v1, :cond_2

    add-int/lit8 v1, p2, 0x1

    add-int/lit8 v2, v0, 0x1

    .line 103
    aget-byte v0, p1, v0

    aput-byte v0, p0, p2

    move p2, v1

    move v0, v2

    goto :goto_0

    :cond_2
    return p2

    .line 104
    :cond_3
    new-instance p0, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {p0, v0}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    goto :goto_2

    :goto_1
    throw p0

    :goto_2
    goto :goto_1
.end method

.method private a(Ljava/lang/String;)Ljava/io/File;
    .locals 3

    .line 73
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->o:Ljava/lang/String;

    if-eqz v0, :cond_0

    goto :goto_0

    .line 74
    :cond_0
    iget-boolean v0, p0, Lcom/estrongs/fs/util/b;->m:Z

    const-string v1, ".eslock"

    if-eqz v0, :cond_1

    .line 75
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-static {v2}, Lcom/estrongs/fs/util/b$a;->a(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 76
    :cond_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {p1}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 77
    :goto_0
    new-instance v1, Ljava/io/File;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {p1}, Lcom/estrongs/android/util/h0;->M(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "/"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/fs/util/f;->j(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    return-object v1
.end method

.method private a(Ljava/io/RandomAccessFile;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 105
    iget v0, p0, Lcom/estrongs/fs/util/c;->f:I

    new-array v1, v0, [B

    iput-object v1, p0, Lcom/estrongs/fs/util/b;->i:[B

    .line 106
    new-array v0, v0, [B

    iput-object v0, p0, Lcom/estrongs/fs/util/b;->j:[B

    .line 107
    invoke-virtual {p1}, Ljava/io/RandomAccessFile;->length()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/estrongs/fs/util/c;->c:J

    const-wide/16 v0, 0x0

    .line 108
    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    .line 109
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->i:[B

    iget v1, p0, Lcom/estrongs/fs/util/c;->f:I

    invoke-static {p1, v0, v1}, Lcom/estrongs/fs/util/c;->a(Ljava/io/RandomAccessFile;[BI)I

    iput v1, p0, Lcom/estrongs/fs/util/b;->g:I

    .line 110
    iget-wide v0, p0, Lcom/estrongs/fs/util/c;->c:J

    iget v2, p0, Lcom/estrongs/fs/util/c;->f:I

    int-to-long v2, v2

    sub-long/2addr v0, v2

    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    .line 111
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->j:[B

    iget v1, p0, Lcom/estrongs/fs/util/c;->f:I

    invoke-static {p1, v0, v1}, Lcom/estrongs/fs/util/c;->a(Ljava/io/RandomAccessFile;[BI)I

    iput v1, p0, Lcom/estrongs/fs/util/b;->h:I

    .line 112
    invoke-virtual {p1}, Ljava/io/RandomAccessFile;->getFilePointer()J

    move-result-wide v0

    iget-wide v2, p0, Lcom/estrongs/fs/util/c;->c:J

    cmp-long p1, v0, v2

    if-nez p1, :cond_0

    return-void

    .line 113
    :cond_0
    new-instance p1, Ljava/io/IOException;

    const-string v0, "RandomAccessFile error!"

    invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method private a(Ljava/io/RandomAccessFile;Ljava/lang/String;)V
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/util/EncryptException;
        }
    .end annotation

    .line 78
    invoke-direct {p0, p2}, Lcom/estrongs/fs/util/b;->b(Ljava/lang/String;)I

    move-result p2

    .line 79
    iget-wide v0, p0, Lcom/estrongs/fs/util/c;->c:J

    int-to-long v2, p2

    add-long/2addr v0, v2

    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->setLength(J)V

    const-wide/16 v0, 0x0

    .line 80
    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    .line 81
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->i:[B

    iget-object v1, p0, Lcom/estrongs/fs/util/c;->a:[B

    invoke-direct {p0, v0, v1}, Lcom/estrongs/fs/util/b;->b([B[B)[B

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/fs/util/b;->l:[B

    .line 82
    array-length v0, v0

    iget-object v1, p0, Lcom/estrongs/fs/util/b;->i:[B

    array-length v1, v1

    const-string v2, "Encrypt error!"

    if-ne v0, v1, :cond_3

    .line 83
    invoke-direct {p0}, Lcom/estrongs/fs/util/b;->c()V

    .line 84
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->l:[B

    iget v1, p0, Lcom/estrongs/fs/util/b;->g:I

    const/4 v3, 0x0

    invoke-virtual {p1, v0, v3, v1}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 85
    iget-wide v0, p0, Lcom/estrongs/fs/util/c;->c:J

    iget v4, p0, Lcom/estrongs/fs/util/c;->f:I

    int-to-long v4, v4

    sub-long/2addr v0, v4

    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    .line 86
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->j:[B

    iget-object v1, p0, Lcom/estrongs/fs/util/c;->a:[B

    invoke-direct {p0, v0, v1}, Lcom/estrongs/fs/util/b;->b([B[B)[B

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/fs/util/b;->l:[B

    .line 87
    array-length v1, v0

    iget-object v4, p0, Lcom/estrongs/fs/util/b;->j:[B

    array-length v4, v4

    if-ne v1, v4, :cond_2

    .line 88
    iget v1, p0, Lcom/estrongs/fs/util/b;->h:I

    invoke-virtual {p1, v0, v3, v1}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 89
    invoke-virtual {p1}, Ljava/io/RandomAccessFile;->getFilePointer()J

    move-result-wide v0

    iget-wide v4, p0, Lcom/estrongs/fs/util/c;->c:J

    cmp-long v2, v0, v4

    if-nez v2, :cond_1

    .line 90
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->k:[B

    invoke-virtual {p1, v0, v3, p2}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 91
    invoke-virtual {p1}, Ljava/io/RandomAccessFile;->close()V

    .line 92
    iget-object p1, p0, Lcom/estrongs/fs/util/b;->q:Ljava/io/File;

    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result p1

    if-eqz p1, :cond_0

    .line 93
    iget-object p1, p0, Lcom/estrongs/fs/util/b;->q:Ljava/io/File;

    invoke-virtual {p1}, Ljava/io/File;->delete()Z

    :cond_0
    return-void

    .line 94
    :cond_1
    new-instance p1, Lcom/estrongs/fs/util/EncryptException;

    const-string p2, "Invalid RandomAccessFile operation"

    invoke-direct {p1, p2}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 95
    :cond_2
    new-instance p1, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {p1, v2}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 96
    :cond_3
    new-instance p1, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {p1, v2}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method private b(Ljava/lang/String;)I
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/estrongs/fs/util/EncryptException;
        }
    .end annotation

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/fs/util/b;->m:Z

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B

    move-result-object p1

    iget-object v0, p0, Lcom/estrongs/fs/util/c;->a:[B

    invoke-direct {p0, p1, v0}, Lcom/estrongs/fs/util/b;->b([B[B)[B

    move-result-object p1

    goto :goto_0

    :cond_0
    move-object p1, v1

    :goto_0
    const/4 v0, 0x0

    if-nez p1, :cond_1

    const/4 v2, 0x0

    goto :goto_1

    .line 3
    :cond_1
    array-length v2, p1

    .line 4
    :goto_1
    iget-boolean v3, p0, Lcom/estrongs/fs/util/c;->d:Z

    const/4 v4, 0x4

    if-nez v3, :cond_2

    .line 5
    invoke-static {v4}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v1

    iget v3, p0, Lcom/estrongs/fs/util/c;->f:I

    invoke-virtual {v1, v3}, Ljava/nio/ByteBuffer;->putInt(I)Ljava/nio/ByteBuffer;

    move-result-object v1

    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v1

    :cond_2
    if-nez v1, :cond_3

    const/4 v3, 0x0

    goto :goto_2

    .line 6
    :cond_3
    array-length v3, v1

    .line 7
    :goto_2
    iget-object v5, p0, Lcom/estrongs/fs/util/c;->a:[B

    invoke-static {v5}, Lcom/estrongs/fs/util/c;->a([B)[B

    move-result-object v5

    const/4 v6, 0x1

    add-int/2addr v3, v6

    add-int/2addr v2, v6

    add-int/2addr v3, v2

    .line 8
    array-length v2, v5

    add-int/2addr v2, v6

    add-int/2addr v3, v2

    add-int/2addr v3, v6

    add-int/lit8 v3, v3, 0x8

    add-int/2addr v3, v4

    .line 9
    new-array v2, v3, [B

    iput-object v2, p0, Lcom/estrongs/fs/util/b;->k:[B

    .line 10
    invoke-static {v2, v1, v0}, Lcom/estrongs/fs/util/b;->a([B[BI)I

    move-result v1

    .line 11
    iget-object v2, p0, Lcom/estrongs/fs/util/b;->k:[B

    invoke-static {v2, p1, v1}, Lcom/estrongs/fs/util/b;->a([B[BI)I

    move-result p1

    .line 12
    iget-object v1, p0, Lcom/estrongs/fs/util/b;->k:[B

    invoke-static {v1, v5, p1}, Lcom/estrongs/fs/util/b;->a([B[BI)I

    move-result p1

    .line 13
    iget-boolean v1, p0, Lcom/estrongs/fs/util/c;->e:Z

    if-eqz v1, :cond_4

    int-to-byte v1, v6

    goto :goto_3

    :cond_4
    const/4 v1, 0x0

    .line 14
    :goto_3
    iget-boolean v2, p0, Lcom/estrongs/fs/util/c;->d:Z

    if-eqz v2, :cond_5

    or-int/lit8 v1, v1, 0x2

    int-to-byte v1, v1

    .line 15
    :cond_5
    iget-object v2, p0, Lcom/estrongs/fs/util/b;->k:[B

    add-int/lit8 v5, p1, 0x1

    aput-byte v1, v2, p1

    .line 16
    invoke-virtual {p0, v2, v0, v5}, Lcom/estrongs/fs/util/c;->a([BII)[B

    move-result-object p1

    .line 17
    iget-object v1, p0, Lcom/estrongs/fs/util/b;->k:[B

    array-length v2, p1

    invoke-static {p1, v0, v1, v5, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 18
    array-length p1, p1

    add-int/2addr v5, p1

    .line 19
    invoke-static {v4}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object p1

    invoke-virtual {p1, v3}, Ljava/nio/ByteBuffer;->putInt(I)Ljava/nio/ByteBuffer;

    move-result-object p1

    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object p1

    .line 20
    iget-object v1, p0, Lcom/estrongs/fs/util/b;->k:[B

    array-length v2, p1

    invoke-static {p1, v0, v1, v5, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    return v3
.end method

.method private b(Ljava/io/RandomAccessFile;)V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 21
    iget-wide v0, p0, Lcom/estrongs/fs/util/c;->c:J

    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->setLength(J)V

    const-wide/16 v0, 0x0

    .line 22
    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    .line 23
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->i:[B

    iget v1, p0, Lcom/estrongs/fs/util/b;->g:I

    const/4 v2, 0x0

    invoke-virtual {p1, v0, v2, v1}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 24
    iget-wide v0, p0, Lcom/estrongs/fs/util/c;->c:J

    iget v3, p0, Lcom/estrongs/fs/util/c;->f:I

    int-to-long v3, v3

    sub-long/2addr v0, v3

    invoke-virtual {p1, v0, v1}, Ljava/io/RandomAccessFile;->seek(J)V

    .line 25
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->j:[B

    iget v1, p0, Lcom/estrongs/fs/util/b;->h:I

    invoke-virtual {p1, v0, v2, v1}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 26
    iget-object p1, p0, Lcom/estrongs/fs/util/b;->q:Ljava/io/File;

    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result p1

    if-eqz p1, :cond_0

    .line 27
    iget-object p1, p0, Lcom/estrongs/fs/util/b;->q:Ljava/io/File;

    invoke-virtual {p1}, Ljava/io/File;->delete()Z

    :cond_0
    return-void
.end method

.method private b([B[B)[B
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/estrongs/fs/util/EncryptException;
        }
    .end annotation

    .line 28
    :try_start_0
    iget-boolean v0, p0, Lcom/estrongs/fs/util/c;->e:Z

    if-eqz v0, :cond_0

    .line 29
    invoke-static {p1, p2}, Lcom/estrongs/fs/util/c;->a([B[B)[B

    move-result-object p1

    return-object p1

    .line 30
    :cond_0
    iget-object p2, p0, Lcom/estrongs/fs/util/b;->n:Ljavax/crypto/Cipher;

    invoke-virtual {p2, p1}, Ljavax/crypto/Cipher;->doFinal([B)[B

    move-result-object p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p1

    :catch_0
    move-exception p1

    .line 31
    new-instance p2, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {p2, p1}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/Throwable;)V

    throw p2
.end method

.method private c()V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/estrongs/fs/util/EncryptException;
        }
    .end annotation

    const/4 v0, 0x0

    .line 1
    :try_start_0
    new-instance v1, Ljava/io/BufferedOutputStream;

    new-instance v2, Ljava/io/FileOutputStream;

    iget-object v3, p0, Lcom/estrongs/fs/util/b;->q:Ljava/io/File;

    invoke-direct {v2, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    invoke-direct {v1, v2}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 2
    :try_start_1
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->i:[B

    iget v2, p0, Lcom/estrongs/fs/util/b;->g:I

    const/4 v3, 0x0

    invoke-virtual {v1, v0, v3, v2}, Ljava/io/OutputStream;->write([BII)V

    .line 3
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->j:[B

    iget v2, p0, Lcom/estrongs/fs/util/b;->h:I

    invoke-virtual {v1, v0, v3, v2}, Ljava/io/OutputStream;->write([BII)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 4
    :try_start_2
    invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0

    :catch_0
    return-void

    :catch_1
    move-exception v0

    goto :goto_0

    :catchall_0
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    goto :goto_1

    :catch_2
    move-exception v1

    move-object v4, v1

    move-object v1, v0

    move-object v0, v4

    .line 5
    :goto_0
    :try_start_3
    new-instance v2, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {v2, v0}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/Throwable;)V

    throw v2
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    :catchall_1
    move-exception v0

    :goto_1
    if-eqz v1, :cond_0

    .line 6
    :try_start_4
    invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_3

    .line 7
    :catch_3
    :cond_0
    throw v0
.end method

.method private c([B)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/crypto/NoSuchPaddingException;,
            Ljava/lang/Exception;,
            Ljava/security/InvalidKeyException;,
            Ljava/security/InvalidAlgorithmParameterException;
        }
    .end annotation

    const/4 v0, 0x1

    :try_start_0
    const-string v1, "2.16.840.1.101.3.4.1.4/CFB/NoPadding"

    .line 8
    invoke-static {v1}, Ljavax/crypto/Cipher;->getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/fs/util/b;->n:Ljavax/crypto/Cipher;
    :try_end_0
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    :try_start_1
    const-string v1, "AES/CFB/NoPadding"

    .line 9
    invoke-static {v1}, Ljavax/crypto/Cipher;->getInstance(Ljava/lang/String;)Ljavax/crypto/Cipher;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/fs/util/b;->n:Ljavax/crypto/Cipher;
    :try_end_1
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_0

    .line 10
    :catch_1
    iput-boolean v0, p0, Lcom/estrongs/fs/util/c;->e:Z

    .line 11
    :goto_0
    invoke-static {p1}, Lcom/estrongs/fs/util/c;->b([B)[B

    move-result-object p1

    const/16 v1, 0x10

    new-array v1, v1, [B

    .line 12
    fill-array-data v1, :array_0

    .line 13
    new-instance v2, Ljavax/crypto/spec/IvParameterSpec;

    invoke-direct {v2, v1}, Ljavax/crypto/spec/IvParameterSpec;-><init>([B)V

    .line 14
    new-instance v1, Ljavax/crypto/spec/SecretKeySpec;

    const-string v3, "AES"

    invoke-direct {v1, p1, v3}, Ljavax/crypto/spec/SecretKeySpec;-><init>([BLjava/lang/String;)V

    .line 15
    iget-object p1, p0, Lcom/estrongs/fs/util/b;->n:Ljavax/crypto/Cipher;

    invoke-virtual {p1, v0, v1, v2}, Ljavax/crypto/Cipher;->init(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V

    return-void

    :array_0
    .array-data 1
        0x0t
        0x1t
        0x2t
        0x3t
        0x4t
        0x5t
        0x6t
        0x7t
        0x8t
        0x9t
        0xat
        0xbt
        0xct
        0xdt
        0xet
        0xft
    .end array-data
.end method


# virtual methods
.method public a()Z
    .locals 17
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    move-object/from16 v1, p0

    .line 1
    invoke-static {}, Les/s80;->A()Les/s80;

    move-result-object v0

    const-wide/16 v2, 0x0

    const/16 v4, 0x9

    const/4 v5, 0x2

    const/4 v6, 0x1

    const/4 v7, 0x0

    if-eqz v0, :cond_0

    new-array v8, v5, [Ljava/lang/Object;

    .line 2
    iget-wide v9, v1, Lcom/estrongs/fs/util/c;->c:J

    invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v9

    aput-object v9, v8, v7

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v9

    aput-object v9, v8, v6

    invoke-virtual {v0, v4, v8}, Les/s80;->b(I[Ljava/lang/Object;)V

    .line 3
    :cond_0
    new-instance v8, Ljava/io/File;

    iget-object v9, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v9}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 4
    iget-object v9, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    invoke-static {v9}, Lcom/estrongs/android/util/n0;->a(Lcom/estrongs/fs/g;)I

    move-result v9

    invoke-static {v9}, Lcom/estrongs/android/util/n0;->t(I)Z

    move-result v9

    if-nez v9, :cond_1

    .line 5
    invoke-virtual {v8}, Ljava/io/File;->length()J

    move-result-wide v10

    const-wide/32 v12, 0x32000

    cmp-long v14, v10, v12

    if-lez v14, :cond_3

    :cond_1
    if-eqz v9, :cond_2

    .line 6
    invoke-virtual {v8}, Ljava/io/File;->length()J

    move-result-wide v10

    const-wide/32 v12, 0x41000

    cmp-long v14, v10, v12

    if-lez v14, :cond_3

    :cond_2
    iget-object v10, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    .line 7
    invoke-interface {v10}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v10

    invoke-static {v10}, Lcom/estrongs/android/util/n0;->N(Ljava/lang/String;)Z

    move-result v10

    if-eqz v10, :cond_4

    :cond_3
    const/4 v10, 0x1

    goto :goto_0

    :cond_4
    const/4 v10, 0x0

    :goto_0
    iput-boolean v10, v1, Lcom/estrongs/fs/util/c;->d:Z

    .line 8
    iget-object v10, v1, Lcom/estrongs/fs/util/c;->a:[B

    invoke-direct {v1, v10}, Lcom/estrongs/fs/util/b;->c([B)V

    .line 9
    iget-boolean v10, v1, Lcom/estrongs/fs/util/c;->d:Z

    const-string v13, "r"

    const-string v14, "rw"

    if-eqz v10, :cond_11

    .line 10
    :try_start_0
    new-instance v10, Ljava/io/RandomAccessFile;

    invoke-direct {v10, v8, v13}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_5
    .catchall {:try_start_0 .. :try_end_0} :catchall_2

    .line 11
    :try_start_1
    iget-object v13, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v13}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v13

    invoke-direct {v1, v13}, Lcom/estrongs/fs/util/b;->a(Ljava/lang/String;)Ljava/io/File;

    move-result-object v13

    iput-object v13, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    .line 12
    new-instance v13, Ljava/io/RandomAccessFile;

    iget-object v15, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-direct {v13, v15, v14}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_4
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 13
    :try_start_2
    invoke-virtual {v10, v2, v3}, Ljava/io/RandomAccessFile;->seek(J)V

    const/16 v14, 0x4000

    new-array v15, v14, [B

    .line 14
    invoke-virtual {v10}, Ljava/io/RandomAccessFile;->length()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/estrongs/fs/util/c;->c:J

    const-wide/16 v2, 0x0

    .line 15
    :goto_1
    invoke-virtual {v10, v15, v7, v14}, Ljava/io/RandomAccessFile;->read([BII)I

    move-result v9

    const/4 v11, -0x1

    if-eq v9, v11, :cond_a

    if-eqz v0, :cond_6

    .line 16
    invoke-virtual {v0}, Les/s80;->z()Z

    move-result v11

    if-eqz v11, :cond_6

    .line 17
    iget-object v0, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    if-eqz v0, :cond_5

    iget-object v0, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_5

    .line 18
    iget-object v0, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->delete()Z
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 19
    :cond_5
    :try_start_3
    invoke-virtual {v13}, Ljava/io/RandomAccessFile;->close()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_2

    :catch_0
    move-exception v0

    move-object v2, v0

    .line 20
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    .line 21
    :goto_2
    :try_start_4
    invoke-virtual {v10}, Ljava/io/RandomAccessFile;->close()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_3

    :catch_1
    move-exception v0

    move-object v2, v0

    .line 22
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    :goto_3
    return v7

    :cond_6
    int-to-long v11, v9

    add-long/2addr v2, v11

    .line 23
    :try_start_5
    iget-object v9, v1, Lcom/estrongs/fs/util/c;->a:[B

    invoke-direct {v1, v15, v9}, Lcom/estrongs/fs/util/b;->b([B[B)[B

    move-result-object v9

    iput-object v9, v1, Lcom/estrongs/fs/util/b;->l:[B

    .line 24
    array-length v4, v9

    if-ne v4, v14, :cond_9

    .line 25
    iget-wide v5, v1, Lcom/estrongs/fs/util/c;->c:J

    cmp-long v16, v2, v5

    if-gez v16, :cond_7

    .line 26
    invoke-virtual {v13, v9, v7, v14}, Ljava/io/RandomAccessFile;->write([BII)V

    goto :goto_4

    .line 27
    :cond_7
    iget-wide v5, v1, Lcom/estrongs/fs/util/c;->c:J

    sub-long v11, v2, v11

    sub-long/2addr v5, v11

    long-to-int v6, v5

    invoke-virtual {v13, v9, v7, v6}, Ljava/io/RandomAccessFile;->write([BII)V

    :goto_4
    if-eqz v0, :cond_8

    const/4 v4, 0x2

    new-array v5, v4, [Ljava/lang/Object;

    .line 28
    iget-wide v11, v1, Lcom/estrongs/fs/util/c;->c:J

    invoke-static {v11, v12}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v6

    aput-object v6, v5, v7

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v6

    const/4 v9, 0x1

    aput-object v6, v5, v9

    const/16 v6, 0x9

    invoke-virtual {v0, v6, v5}, Les/s80;->b(I[Ljava/lang/Object;)V

    :cond_8
    const/16 v4, 0x9

    const/4 v5, 0x2

    const/4 v6, 0x1

    goto :goto_1

    .line 29
    :cond_9
    new-instance v0, Lcom/estrongs/fs/util/EncryptException;

    const-string v2, "Encrypt error!"

    invoke-direct {v0, v2}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 30
    :cond_a
    iget-wide v5, v1, Lcom/estrongs/fs/util/c;->c:J
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_3
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    const-string v9, "Invalid RandomAccessFile operation"

    cmp-long v11, v2, v5

    if-ltz v11, :cond_d

    .line 31
    :try_start_6
    invoke-virtual {v10}, Ljava/io/RandomAccessFile;->getFilePointer()J

    move-result-wide v2

    iget-wide v5, v1, Lcom/estrongs/fs/util/c;->c:J

    cmp-long v11, v2, v5

    if-nez v11, :cond_c

    .line 32
    invoke-virtual {v8}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/estrongs/fs/util/b;->b(Ljava/lang/String;)I

    move-result v2

    .line 33
    iget-object v3, v1, Lcom/estrongs/fs/util/b;->k:[B

    invoke-virtual {v13, v3, v7, v2}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 34
    invoke-virtual {v13}, Ljava/io/RandomAccessFile;->close()V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_3
    .catchall {:try_start_6 .. :try_end_6} :catchall_0

    .line 35
    :try_start_7
    invoke-virtual {v8}, Ljava/io/File;->delete()Z

    .line 36
    sget-object v2, Lcom/estrongs/fs/util/a;->s:Ljava/util/Map;

    invoke-virtual {v8}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcom/estrongs/android/util/h0;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    if-eqz v0, :cond_b

    const/4 v2, 0x2

    new-array v3, v2, [Ljava/lang/Object;

    const-wide/16 v5, 0x1

    .line 37
    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    aput-object v2, v3, v7

    iget-object v2, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v2

    const/4 v5, 0x1

    aput-object v2, v3, v5

    const/4 v2, 0x2

    invoke-virtual {v0, v2, v3}, Les/s80;->b(I[Ljava/lang/Object;)V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_4
    .catchall {:try_start_7 .. :try_end_7} :catchall_1

    .line 38
    :cond_b
    :try_start_8
    invoke-virtual {v10}, Ljava/io/RandomAccessFile;->close()V
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_2

    :goto_5
    const/4 v2, 0x1

    goto :goto_6

    :catch_2
    move-exception v0

    move-object v2, v0

    .line 39
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_5

    :goto_6
    return v2

    .line 40
    :cond_c
    :try_start_9
    new-instance v0, Lcom/estrongs/fs/util/EncryptException;

    invoke-direct {v0, v9}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 41
    :cond_d
    new-instance v0, Ljava/io/IOException;

    invoke-direct {v0, v9}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v0
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_3
    .catchall {:try_start_9 .. :try_end_9} :catchall_0

    :catchall_0
    move-exception v0

    move-object v2, v0

    goto :goto_9

    :catch_3
    move-exception v0

    move-object v9, v10

    goto :goto_8

    :catchall_1
    move-exception v0

    move-object v2, v0

    const/4 v9, 0x0

    goto :goto_a

    :catch_4
    move-exception v0

    move-object v9, v10

    goto :goto_7

    :catchall_2
    move-exception v0

    move-object v2, v0

    const/4 v9, 0x0

    const/4 v10, 0x0

    goto :goto_a

    :catch_5
    move-exception v0

    const/4 v9, 0x0

    :goto_7
    const/4 v13, 0x0

    .line 42
    :goto_8
    :try_start_a
    iget-object v2, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    if-eqz v2, :cond_e

    iget-object v2, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_e

    .line 43
    iget-object v2, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-virtual {v2}, Ljava/io/File;->delete()Z

    .line 44
    :cond_e
    throw v0
    :try_end_a
    .catchall {:try_start_a .. :try_end_a} :catchall_3

    :catchall_3
    move-exception v0

    move-object v2, v0

    move-object v10, v9

    :goto_9
    move-object v9, v13

    :goto_a
    if-eqz v9, :cond_f

    .line 45
    :try_start_b
    invoke-virtual {v9}, Ljava/io/RandomAccessFile;->close()V
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_6

    goto :goto_b

    :catch_6
    move-exception v0

    move-object v3, v0

    .line 46
    invoke-virtual {v3}, Ljava/lang/Exception;->printStackTrace()V

    :cond_f
    :goto_b
    if-eqz v10, :cond_10

    .line 47
    :try_start_c
    invoke-virtual {v10}, Ljava/io/RandomAccessFile;->close()V
    :try_end_c
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_c} :catch_7

    goto :goto_c

    :catch_7
    move-exception v0

    move-object v3, v0

    .line 48
    invoke-virtual {v3}, Ljava/lang/Exception;->printStackTrace()V

    .line 49
    :cond_10
    :goto_c
    throw v2

    :cond_11
    if-nez v9, :cond_12

    const/16 v2, 0x400

    .line 50
    iput v2, v1, Lcom/estrongs/fs/util/c;->f:I

    goto :goto_d

    :cond_12
    const v2, 0x20800

    .line 51
    iput v2, v1, Lcom/estrongs/fs/util/c;->f:I

    .line 52
    :goto_d
    :try_start_d
    new-instance v2, Ljava/io/RandomAccessFile;

    invoke-direct {v2, v8, v13}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 53
    invoke-direct {v1, v2}, Lcom/estrongs/fs/util/b;->a(Ljava/io/RandomAccessFile;)V

    .line 54
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->close()V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_d .. :try_end_d} :catch_a

    .line 55
    iget-object v2, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/estrongs/fs/util/b;->a(Ljava/lang/String;)Ljava/io/File;

    move-result-object v2

    iput-object v2, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    .line 56
    invoke-virtual {v8, v2}, Ljava/io/File;->renameTo(Ljava/io/File;)Z

    move-result v2

    if-nez v2, :cond_13

    return v7

    .line 57
    :cond_13
    :try_start_e
    new-instance v2, Ljava/io/RandomAccessFile;

    iget-object v3, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-direct {v2, v3, v14}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_e
    .catch Ljava/lang/Exception; {:try_start_e .. :try_end_e} :catch_9

    .line 58
    :try_start_f
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v8}, Ljava/io/File;->getParent()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v5, "/."

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v5, ".raw"

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 59
    invoke-static {v3}, Lcom/estrongs/fs/util/f;->j(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 60
    new-instance v5, Ljava/io/File;

    invoke-direct {v5, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v5, v1, Lcom/estrongs/fs/util/b;->q:Ljava/io/File;

    .line 61
    invoke-virtual {v8}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v1, v2, v3}, Lcom/estrongs/fs/util/b;->a(Ljava/io/RandomAccessFile;Ljava/lang/String;)V

    .line 62
    sget-object v2, Lcom/estrongs/fs/util/a;->s:Ljava/util/Map;

    invoke-virtual {v8}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcom/estrongs/android/util/h0;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    if-eqz v0, :cond_14

    const/4 v2, 0x2

    new-array v3, v2, [Ljava/lang/Object;

    .line 63
    iget-wide v5, v1, Lcom/estrongs/fs/util/c;->c:J

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    aput-object v2, v3, v7

    iget-wide v5, v1, Lcom/estrongs/fs/util/c;->c:J

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    const/4 v5, 0x1

    aput-object v2, v3, v5

    const/16 v2, 0x9

    invoke-virtual {v0, v2, v3}, Les/s80;->b(I[Ljava/lang/Object;)V

    const/4 v2, 0x2

    new-array v3, v2, [Ljava/lang/Object;

    const-wide/16 v5, 0x1

    .line 64
    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    aput-object v2, v3, v7

    iget-object v2, v1, Lcom/estrongs/fs/util/c;->b:Lcom/estrongs/fs/g;

    invoke-interface {v2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v2

    const/4 v5, 0x1

    aput-object v2, v3, v5

    const/4 v2, 0x2

    invoke-virtual {v0, v2, v3}, Les/s80;->b(I[Ljava/lang/Object;)V
    :try_end_f
    .catch Ljava/lang/Exception; {:try_start_f .. :try_end_f} :catch_8

    :cond_14
    const/4 v2, 0x1

    return v2

    :catch_8
    move-exception v0

    .line 65
    iget-object v2, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-virtual {v2, v8}, Ljava/io/File;->renameTo(Ljava/io/File;)Z

    move-result v2

    if-nez v2, :cond_15

    .line 66
    new-instance v0, Lcom/estrongs/fs/util/EncryptException;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Invalid file access "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, v1, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v2}, Lcom/estrongs/fs/util/EncryptException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 67
    :cond_15
    new-instance v2, Ljava/io/RandomAccessFile;

    invoke-direct {v2, v8, v14}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 68
    invoke-direct {v1, v2}, Lcom/estrongs/fs/util/b;->b(Ljava/io/RandomAccessFile;)V

    .line 69
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->close()V

    .line 70
    throw v0

    :catch_9
    move-exception v0

    .line 71
    throw v0

    :catch_a
    move-exception v0

    .line 72
    goto :goto_f

    :goto_e
    throw v0

    :goto_f
    goto :goto_e
.end method

.method public b()Ljava/lang/String;
    .locals 1

    .line 32
    iget-object v0, p0, Lcom/estrongs/fs/util/b;->p:Ljava/io/File;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return-object v0

    .line 33
    :cond_0
    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
